import React, { Component } from 'react'
import TheImage from "../TheImage";
import goBack from '@/assets/icons/goBack.png'
import './style/index.less'

class GoBack extends Component {
    render() {
        const title = this.props.title || ''
        return <header className='go-back-header'>
            <div onClick={() => this.props.history && this.props.history.goBack()}
                style={{ display: 'flex', alignItems: 'center' }}>
                <TheImage preview={false} width={22} src={goBack} />
            </div>
            <div className={'go-back-title'}>{title}</div>
        </header>
    }
}

export default GoBack